using System.Data;
using ET;
namespace DA
{
	public class Income_Expenditure_Method_DAL
	{
	private clsConnect cls = new clsConnect();

	#region Getdata
	public DataTable BindGirdtb_Income_Expenditure_Method(string keywords)
	{
        return cls.Search("sp_tb_Income_Expenditure_Method_Search", "@KeyWords", keywords);
	}
    //public DataTable BindGirdtb_Income_Expenditure_MethodDetail(int id)
    //{
    //}
	#endregion

	#region Insert
	public bool Inserttb_Income_Expenditure_Method(Income_Expenditure_Method_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Income_Expenditure_Method_Name", data.Income_Expenditure_Method_Name);
	cls.AddParameter("@Income_Expenditure_Method_User_Add", data.Income_Expenditure_Method_User_Add);
	cls.AddParameter("@Income_Expenditure_Method_Date_Add", data.Income_Expenditure_Method_Date_Add);
	cls.AddParameter("@Income_Expenditure_Method_Computer_Add", data.Income_Expenditure_Method_Computer_Add);
	cls.AddParameter("@Income_Expenditure_Method_User_Modify", data.Income_Expenditure_Method_User_Modify);
	cls.AddParameter("@Income_Expenditure_Method_Date_Modify", data.Income_Expenditure_Method_Date_Modify);
	cls.AddParameter("@Income_Expenditure_Method_Computer_Modify", data.Income_Expenditure_Method_Computer_Modify);
	cls.ExecuteNonQuery("sp_tb_Income_Expenditure_Method_Insert");
	return true;
	}
	#endregion

	#region Update
	public bool Updatetb_Income_Expenditure_Method(Income_Expenditure_Method_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Income_Expenditure_Method_ID", data.Income_Expenditure_Method_ID);
	cls.AddParameter("@Income_Expenditure_Method_Name", data.Income_Expenditure_Method_Name);
	cls.AddParameter("@Income_Expenditure_Method_User_Modify", data.Income_Expenditure_Method_User_Modify);
	cls.AddParameter("@Income_Expenditure_Method_Date_Modify", data.Income_Expenditure_Method_Date_Modify);
	cls.AddParameter("@Income_Expenditure_Method_Computer_Modify", data.Income_Expenditure_Method_Computer_Modify);
	cls.ExecuteNonQuery("sp_tb_Income_Expenditure_Method_Update");
	return true;
	}
	#endregion

	#region Delete
	public bool Deletetb_Income_Expenditure_Method(int id)
	{
        cls.Delete("sp_tb_Income_Expenditure_Method_Delete", "@Income_Expenditure_Method_ID", id);
	return true;
	}
	#endregion
	}
}